package com.blue.rpc.server.provider;

import org.springframework.stereotype.Component;

import com.blue.core.util.JsonUtil;
import com.blue.rpc.core.annotation.Rpc;
import com.blue.rpc.server.facade.UserInfoFacade;
import com.blue.rpc.server.model.UserInfo;

@Component
@Rpc(UserInfoFacade.class)
public class UserInfoProvider implements UserInfoFacade
{
	public UserInfoProvider()
	{
	}

	@Override
	public UserInfo hello(UserInfo userInfo)
	{
		System.out.println("收到信息：" + JsonUtil.output(userInfo));
		Integer id = userInfo.getId();
		userInfo.setId(id + 1000);
		return userInfo;
	}
}
